const oBtns = document.querySelector("#login-btn");
setInterval(function () {
  const User = JSON.parse(sessionStorage.User || "[]");
  let login = User.uname;
  oBtns.innerHTML = login ? `${User.uname}的购物车` : "立即登录";
  oBtns.href = login ? "../info/info.html" : "../login/login.html";
  //   console.log(oBtns.innerHTML);
  //   console.log(oBtns.href);
});
